﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SharpMap.Styles;

namespace KoalaGIS
{
    public partial class LayerAttribute : Form
    {
        private SharpMap.Styles.VectorStyle _style;
            
        public LayerAttribute()
        {
            InitializeComponent();
        }

        public VectorStyle Style { get; set; }

        private void LayerAttribute_Load(object sender, EventArgs e)
        {
            this.colorFill.Value = (Style.Fill as SolidBrush).Color;
        }


        private void DrawFillStyle(Graphics g)
        {
            PointF[] pts = new PointF[5];

            pts[0] = new PointF(10f, 50f);
            pts[1] = new PointF(10f, 150f);
            pts[0] = new PointF(150f, 150f);
            pts[0] = new PointF(150f, 10f);
            pts[0] = new PointF(10f, 50f);

            Pen outline = Style.Outline;
            g.DrawPolygon(outline, pts);

            Brush brush = Style.Fill;
            g.FillPolygon(brush, pts);

        }
    }
}
